.class public Lrexsee/core/browser/clazz/TouchListener;
.super Ljava/lang/Object;
.source "TouchListener.java"

# interfaces
.implements Landroid/view/View$OnTouchListener;


# instance fields
.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private final mGestureDetector:Landroid/view/GestureDetector;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;Landroid/view/GestureDetector;)V
    .locals 0
    .param p1, "browser"    # Lrexsee/core/browser/Browser;
    .param p2, "gestureDetector"    # Landroid/view/GestureDetector;

    .prologue
    .line 14
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 15
    iput-object p1, p0, Lrexsee/core/browser/clazz/TouchListener;->mBrowser:Lrexsee/core/browser/Browser;

    .line 16
    iput-object p2, p0, Lrexsee/core/browser/clazz/TouchListener;->mGestureDetector:Landroid/view/GestureDetector;

    .line 17
    return-void
.end method


# virtual methods
.method public onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .locals 5
    .param p1, "v"    # Landroid/view/View;
    .param p2, "event"    # Landroid/view/MotionEvent;

    .prologue
    const/4 v4, 0x1

    .line 21
    iget-object v2, p0, Lrexsee/core/browser/clazz/TouchListener;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v2, v2, Lrexsee/core/style/StyleSheet;->event_touchmove:Ljava/lang/String;

    const-string v3, "true"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    .line 22
    .local v1, "listenToTouchMove":Z
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    .line 23
    .local v0, "action":I
    if-nez v0, :cond_1

    .line 24
    iget-object v2, p0, Lrexsee/core/browser/clazz/TouchListener;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->touchEventInfo:Lrexsee/core/browser/clazz/TouchEventInfo;

    sget-object v3, Lrexsee/core/browser/clazz/TouchEventInfo;->EVENT_DOWN:Ljava/lang/String;

    invoke-virtual {v2, v3, p2}, Lrexsee/core/browser/clazz/TouchEventInfo;->basicAssignment(Ljava/lang/String;Landroid/view/MotionEvent;)V

    .line 25
    iget-object v2, p0, Lrexsee/core/browser/clazz/TouchListener;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v3, "onTouchDown"

    invoke-virtual {v2, v3}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;)V

    .line 38
    :cond_0
    :goto_0
    iget-object v2, p0, Lrexsee/core/browser/clazz/TouchListener;->mGestureDetector:Landroid/view/GestureDetector;

    if-eqz v2, :cond_4

    iget-object v2, p0, Lrexsee/core/browser/clazz/TouchListener;->mGestureDetector:Landroid/view/GestureDetector;

    invoke-virtual {v2, p2}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v2

    :goto_1
    return v2

    .line 26
    :cond_1
    if-ne v0, v4, :cond_2

    .line 27
    iget-object v2, p0, Lrexsee/core/browser/clazz/TouchListener;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->touchEventInfo:Lrexsee/core/browser/clazz/TouchEventInfo;

    sget-object v3, Lrexsee/core/browser/clazz/TouchEventInfo;->EVENT_UP:Ljava/lang/String;

    invoke-virtual {v2, v3, p2}, Lrexsee/core/browser/clazz/TouchEventInfo;->basicAssignment(Ljava/lang/String;Landroid/view/MotionEvent;)V

    .line 28
    iget-object v2, p0, Lrexsee/core/browser/clazz/TouchListener;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v3, "onTouchUp"

    invoke-virtual {v2, v3}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;)V

    goto :goto_0

    .line 29
    :cond_2
    const/4 v2, 0x2

    if-ne v0, v2, :cond_3

    if-eqz v1, :cond_3

    .line 30
    iget-object v2, p0, Lrexsee/core/browser/clazz/TouchListener;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->touchEventInfo:Lrexsee/core/browser/clazz/TouchEventInfo;

    sget-object v3, Lrexsee/core/browser/clazz/TouchEventInfo;->EVENT_MOVE:Ljava/lang/String;

    invoke-virtual {v2, v3, p2}, Lrexsee/core/browser/clazz/TouchEventInfo;->basicAssignment(Ljava/lang/String;Landroid/view/MotionEvent;)V

    .line 31
    iget-object v2, p0, Lrexsee/core/browser/clazz/TouchListener;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v3, "onTouchMove"

    invoke-virtual {v2, v3}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;)V

    move v2, v4

    .line 32
    goto :goto_1

    .line 33
    :cond_3
    const/4 v2, 0x3

    if-ne v0, v2, :cond_0

    if-eqz v1, :cond_0

    .line 34
    iget-object v2, p0, Lrexsee/core/browser/clazz/TouchListener;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->touchEventInfo:Lrexsee/core/browser/clazz/TouchEventInfo;

    sget-object v3, Lrexsee/core/browser/clazz/TouchEventInfo;->EVENT_CANCEL:Ljava/lang/String;

    invoke-virtual {v2, v3, p2}, Lrexsee/core/browser/clazz/TouchEventInfo;->basicAssignment(Ljava/lang/String;Landroid/view/MotionEvent;)V

    .line 35
    iget-object v2, p0, Lrexsee/core/browser/clazz/TouchListener;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v3, "onTouchCancel"

    invoke-virtual {v2, v3}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;)V

    move v2, v4

    .line 36
    goto :goto_1

    .line 38
    :cond_4
    const/4 v2, 0x0

    goto :goto_1
.end method
